package com.example.portdemo.date.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

import com.example.portdemo.date.model.NewsEntity;

import java.util.List;

@Dao
public interface NewsDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insertAll(List<NewsEntity> newsEntities);

    @Query("SELECT * FROM news")
    List<NewsEntity> getNewsList();

    // 其他与新闻相关的数据库操作方法
}
